/*
 * ISearchCriterion.java Copyright 2004 Paul Mukherjee
 */
package org.nanhill.commons.pattern.search;

/**
 * @author alin [xalinx at gmail dot com]
 * @date 2006-10-27
 * 
 * Interface to be implemented by all search criteria.
 * 
 */
public interface SearchCriterion {

	/**
	 * @return The display name for the search criterion. This is suitable for
	 *         labelling of search criterion in the user interface.
	 */
	public String getDisplay();

	/**
	 * Entry point for visitor.
	 * 
	 * @param visitor
	 *            The visitor visiting this object
	 * @throws SearchException
	 *             Thrown if there was a problem visiting the object.
	 */
	void accept(SearchVisitor visitor) throws SearchException;

	/**
	 * Get Criterion value for visitor.
	 * 
	 * @return Criterion value for visitor.
	 */
	Object getValue();

}
